home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_12
/
1012100a
< prev
next >
Wrap
Text File
|
1992-05-25
|
979b
|
32 lines
/* LISTING 3. DOSTBL2.H */
/* User-Defined State Table for Application */
/* State Machine default functions */
extern short errmsg(char *);
extern short isEOR(char *);
extern short skip(char *);
/* Application functions */
extern short isdrive(char *);
extern short isext(char *);
extern short isfname(char *);
extern short ispath(char *);
extern short isroot(char *);
extern short appendpath(char *);
extern short cleanup(char *);
extern short savedrive(char *);
extern short saveext(char *);
extern short savefname(char *);
/* Initialize the state table */
DFATBL semdos_stt[] = {
/* 0 */ { isdrive, 1, 1, savedrive, skip },
/* 1 */ { isroot, 2, 2, appendpath, skip },
/* 2 */ { ispath, 2, 3, appendpath, skip },
/* 3 */ { isfname, 4, ERR, savefname, errmsg},
/* 4 */ { isext, 5, 5, saveext, skip },
/* 5 */ { isEOR, OUT, ERR, cleanup, errmsg},
};